1. Field
The disclosure herein relates to a data processing apparatus, a method for processing data, and a computer readable recording medium recorded with a program to perform the method, and more particularly to a data processing apparatus, which can efficiently decompress compressed data stored in a first storage device and store the decompressed data in a second storage device, a method for processing data, and a computer readable recording medium recorded with a program to perform the method.
2. Description of the Related Art
In a virtual memory and demand page type operating system (for example, Linux, MS Windows, or the like), execution codes and data (for example, picture pixels for a user interface or font data) are stored in a first storage device in a compressed form. If the execution codes and data are demanded according to a user command, the compressed data that is stored in the first storage device is decompressed and stored in a second storage device, and a central processing unit (CPU) performs a job according to the user command by accessing the decompressed data stored in the second storage device.
In particular, a method for decompressing compressed data in the related art will be described with reference to FIG. 1. FIG. 1 is a diagram illustrating the software configuration for processing data in the related art.
In the related art, in order for a CPU (not illustrated) of a data processing apparatus to access data for performing a job commanded by a user, the CPU loads the compressed data stored in a storage driver 16 into a buffer head 18. The buffer head 18 transmits the compressed data to a SW decompressor 19 to decompress the compressed data. Then, the SW decompressor 19 decompresses the compressed data under the control of the CPU and outputs decompressed data to a middle buffer 20, and the middle buffer 20 copies the decompressed data into a page cache 17. The CPU can access data for performing the job commanded by the user by accessing the decompressed data stored in the page cache 17. The data processing apparatus may further include a user application 11 which may include an application to receive an input, a virtual file system 12 and a page fault handler 13 which may be used for communication with the page cache 17. The data processing apparatus may further include a block layer 15.
That is, in the related art, until the compressed data is decompressed in an uncompressed form and a data processing apparatus can use the decompressed data, an operation to load the compressed data from the storage driver 16 to the buffer head 18, an operation to output the decompressed data from the buffer head 18 to the middle buffer 20, and an operation to copy the decompressed data from the middle buffer 20 to the page cache 17 are performed in order. As a result, in order to store the data in the page cache 17 from which the data processing apparatus can finally use the data, data movement is performed three times in total.
Such data movement may exert an influence on the system performance, that is, a program operating speed that a user feels. Further, in order for the CPU to decompress the data and access the decompressed data, it is necessary to input the data to a cache provided between the storage device and the CPU so that the compressed data and the decompressed data can be accessed by the CPU, and this causes the occurrence of unnecessary operations and costs.